Collection

constructor(name: String? = null, type: Collection.CollectionType? = null, system: Boolean? = null, fields: List<SchemaField>? = null, listRule: String? = null, viewRule: String? = null, createRule: String? = null, updateRule: String? = null, deleteRule: String? = null, indexes: List<String>? = null, collectionId: String? = null)

Parameters

name

the name of the collection.

type

the type of the collection.

system

weather the collection was created internally by Pocketbase.

fields

the collection's SchemaFields which are used to determine what values are acceptable.

listRule

the pocketbase API rule which determines who can view each Record in the collection.

viewRule

the pocketbase API rule which determines who can view an individual Record in the collection.

createRule

the pocketbase API rules that determine who can create a Record in the collection.

updateRule

the pocketbase API rules that determine who can update a Record in the collection.

deleteRule

the pocketbase API rules that determine who can delete a Record in the collection.

indexes

the collection indexes which are used to determine which fields are unique.